package cntv.player.core.util;

import cntv.player.engine.Const;
import android.util.Log;

public class LogUtil {

	private static final int LOGGER_VERBOSE = 1;
	private static final int LOGGER_DEBUG = 2;
	private static final int LOGGER_INFO = 3;
	private static final int LOGGER_WARN = 4;
	private static final int LOGGER_ERROR = 5;
	private static int LOGGER_LEVEL = 10;

	public static int v(String TAG, String data) {
		if (LOGGER_LEVEL > LOGGER_VERBOSE) {
			return Log.v(Const.URLPRE + TAG, data);
		} else {
			return 0;
		}
	}

	public static int d(String TAG, String data) {
		if (LOGGER_LEVEL > LOGGER_DEBUG) {
			return Log.d(Const.URLPRE + TAG, data);
		} else {
			return 0;
		}
	}

	public static int i(String TAG, String data) {
		if (LOGGER_LEVEL > LOGGER_INFO) {

			return Log.i(Const.URLPRE + TAG, data);
		} else {
			return 0;
		}
	}

	public static int w(String TAG, String data) {
		if (LOGGER_LEVEL > LOGGER_WARN) {
			return Log.w(Const.URLPRE + TAG, data);
		} else {
			return 0;
		}
	}

	public static int e(String TAG, String data) {
		if (LOGGER_LEVEL > LOGGER_ERROR) {
			return Log.e(Const.URLPRE + TAG, data);
		} else {
			return 0;
		}
	}
	public static int u(String data) {
		if (LOGGER_LEVEL > LOGGER_ERROR) {
			return Log.d(Const.URLPRE + "zl", data);
		} else {
			return 0;
		}
	}
}
